package com.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import java.io.IOException;

/**
 * Created by dpeng on 2015/8/31.
 */
public class Loop extends SimpleTagSupport {

    private int count;

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public void doTag() throws JspException, IOException {
        for(int i = 0; i < count; i++) {
            getJspBody().invoke(null);
        }
    }
}
